Optimal. Leaf size=92 \[ -\frac {a^3 \cos ^3(c+d x)}{3 d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a^3 x}{2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.14, antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 10, number of rules used = 7, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {2709, 3770, 3767, 8, 2638, 2635, 2633} \[ -\frac {a^3 \cos ^3(c+d x)}{3 d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^3 \sin (c+d x) \cos (c+d x)}{2 d}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {a^3 x}{2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2633
Rule 2635
Rule 2638
Rule 2709
Rule 3767
Rule 3770
Rubi steps
\begin {align*} \int \cot ^2(c+d x) (a+a \sin (c+d x))^3 \, dx &=\frac {\int \left (2 a^5+3 a^5 \csc (c+d x)+a^5 \csc ^2(c+d x)-2 a^5 \sin (c+d x)-3 a^5 \sin ^2(c+d x)-a^5 \sin ^3(c+d x)\right ) \, dx}{a^2}\\ &=2 a^3 x+a^3 \int \csc ^2(c+d x) \, dx-a^3 \int \sin ^3(c+d x) \, dx-\left (2 a^3\right ) \int \sin (c+d x) \, dx+\left (3 a^3\right ) \int \csc (c+d x) \, dx-\left (3 a^3\right ) \int \sin ^2(c+d x) \, dx\\ &=2 a^3 x-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {2 a^3 \cos (c+d x)}{d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{2 d}-\frac {1}{2} \left (3 a^3\right ) \int 1 \, dx-\frac {a^3 \operatorname {Subst}(\int 1 \, dx,x,\cot (c+d x))}{d}+\frac {a^3 \operatorname {Subst}\left (\int \left (1-x^2\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=\frac {a^3 x}{2}-\frac {3 a^3 \tanh ^{-1}(\cos (c+d x))}{d}+\frac {3 a^3 \cos (c+d x)}{d}-\frac {a^3 \cos ^3(c+d x)}{3 d}-\frac {a^3 \cot (c+d x)}{d}+\frac {3 a^3 \cos (c+d x) \sin (c+d x)}{2 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 1.09, size = 106, normalized size = 1.15 \[ -\frac {a^3 \csc \left (\frac {1}{2} (c+d x)\right ) \sec \left (\frac {1}{2} (c+d x)\right ) \left ((15-66 \sin (c+d x)) \cos (c+d x)+(2 \sin (c+d x)+9) \cos (3 (c+d x))-12 \sin (c+d x) \left (6 \log \left (\sin \left (\frac {1}{2} (c+d x)\right )\right )-6 \log \left (\cos \left (\frac {1}{2} (c+d x)\right )\right )+c+d x\right )\right )}{48 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.45, size = 121, normalized size = 1.32 \[ -\frac {9 \, a^{3} \cos \left (d x + c\right )^{3} + 9 \, a^{3} \log \left (\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 9 \, a^{3} \log \left (-\frac {1}{2} \, \cos \left (d x + c\right ) + \frac {1}{2}\right ) \sin \left (d x + c\right ) - 3 \, a^{3} \cos \left (d x + c\right ) + {\left (2 \, a^{3} \cos \left (d x + c\right )^{3} - 3 \, a^{3} d x - 18 \, a^{3} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{6 \, d \sin \left (d x + c\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 1.39, size = 162, normalized size = 1.76 \[ \frac {3 \, {\left (d x + c\right )} a^{3} + 18 \, a^{3} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) \right |}\right ) + 3 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \frac {3 \, {\left (6 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + a^{3}\right )}}{\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )} - \frac {2 \, {\left (9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{4} - 36 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 9 \, a^{3} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 16 \, a^{3}\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + 1\right )}^{3}}}{6 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.14, size = 105, normalized size = 1.14 \[ -\frac {a^{3} \left (\cos ^{3}\left (d x +c \right )\right )}{3 d}+\frac {3 a^{3} \cos \left (d x +c \right ) \sin \left (d x +c \right )}{2 d}+\frac {a^{3} x}{2}+\frac {a^{3} c}{2 d}+\frac {3 a^{3} \cos \left (d x +c \right )}{d}+\frac {3 a^{3} \ln \left (\csc \left (d x +c \right )-\cot \left (d x +c \right )\right )}{d}-\frac {a^{3} \cot \left (d x +c \right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.40, size = 93, normalized size = 1.01 \[ -\frac {4 \, a^{3} \cos \left (d x + c\right )^{3} - 9 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} a^{3} + 12 \, {\left (d x + c + \frac {1}{\tan \left (d x + c\right )}\right )} a^{3} - 18 \, a^{3} {\left (2 \, \cos \left (d x + c\right ) - \log \left (\cos \left (d x + c\right ) + 1\right ) + \log \left (\cos \left (d x + c\right ) - 1\right )\right )}}{12 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 6.77, size = 264, normalized size = 2.87 \[ \frac {3\,a^3\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {a^3\,\mathrm {atan}\left (\frac {a^6}{6\,a^6-a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}+\frac {6\,a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{6\,a^6-a^6\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}\right )}{d}+\frac {a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{2\,d}+\frac {-7\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+8\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5-3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4+24\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+3\,a^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+\frac {32\,a^3\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{3}-a^3}{d\,\left (2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+6\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+2\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ a^{3} \left (\int 3 \sin {\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int 3 \sin ^{2}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int \sin ^{3}{\left (c + d x \right )} \cot ^{2}{\left (c + d x \right )}\, dx + \int \cot ^{2}{\left (c + d x \right )}\, dx\right ) \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________